﻿CREATE PROCEDURE [ServiceEngine].[ListChannelsForPolicyID]
	@PolicyID uniqueidentifier
AS
BEGIN
	SET NOCOUNT ON;

	SELECT	N.[EntityID] as ChannelID, N.[EntityName] as [Name], N.EntityDescription as Description
	FROM	[ServiceEngine].Names N
	INNER JOIN [ServiceEngine].Entity_Policies P ON N.EntityID = P.EntityID
	WHERE	N.[EntityTypeID] = 7 AND P.PolicyID = @PolicyID
	Order by N.[EntityName]
END


